unit uLogowanie;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, uFormBaseDialog, JvComponentBase, JvBalloonHint, Menus, JvMenus, ImgList, JvImageList, ActnList, JvVersionControlActions, ExtCtrls,
  JvExExtCtrls, JvImage, JvExControls, JvButton, JvTransparentButton, JvExtComponent, JvPanel, JvGradientHeaderPanel, StdCtrls, JvExStdCtrls,
  JvCheckBox, JvLabel, JvEdit;

type
  TfLogowanie = class(TfFormBaseDialog)
    JvLabel1: TJvLabel;
    JvCBDifLog: TJvCheckBox;
    JvEdtLogin: TJvEdit;
    JvEdtPass: TJvEdit;
    JvLLogin: TJvLabel;
    JvLPass: TJvLabel;
    JvImage1: TJvImage;
    actJvEditEnter: TAction;
    procedure JvLabel1Click(Sender: TObject);
    procedure actJvEditEnterExecute(Sender: TObject);
    procedure JvEdtExit(Sender: TObject);
    procedure JvEdtEnter(Sender: TObject);
    procedure JvCBDifLogClick(Sender: TObject);
  private
    { Private declarations }
    ColorEditBeforEnter : TColor;
  public
    { Public declarations }

  end;

var
  fLogowanie: TfLogowanie;

implementation

uses
  uBaza;
{$R *.dfm}

procedure TfLogowanie.actJvEditEnterExecute(Sender: TObject);
begin
  inherited;
  JvEdtLogin.Color := RGB(255,244,154);
end;

procedure TfLogowanie.JvCBDifLogClick(Sender: TObject);
begin
  inherited;
  JvEdtLogin.Enabled := not JvCBDifLog.Checked;
  JvEdtPass.Enabled := not JvCBDifLog.Checked;

end;

procedure TfLogowanie.JvEdtEnter(Sender: TObject);
begin
  if Sender is TJvEdit then
    with Sender as TJvEdit do
    begin
      ColorEditBeforEnter := Color;
      Color := RGB(255,244,154);
    end;
end;

procedure TfLogowanie.JvEdtExit(Sender: TObject);
begin
  if Sender is TJvEdit then
    with Sender as TJvEdit do
      Color := ColorEditBeforEnter;
end;

procedure TfLogowanie.JvLabel1Click(Sender: TObject);
begin
  JvCBDifLog.Checked := not JvCBDifLog.Checked;
end;

end.
